<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <h1>HELLO Index</h1>
    <input type="file" onchange="upload(this)" />
    <script src="./axios.min.js"></script>
    <script>
      const request = axios.create({
        baseURL: "http://127.0.0.1:8090/api/collections",
      });

      function upload(el) {
        const avatar = el.files[0];
        request
          .post("/users/records", {
            emailVisibility: true,
            password: "12345678",
            passwordConfirm: "12345678",
          })
          .then((data) => console.log(data));
      }
    </script>
  </body>
</html>
